using System;
using System.ComponentModel.DataAnnotations;
using SqlSugar;

namespace ERP.Domain
{
    /// <summary>
    /// 订单表
    /// </summary>
    [SugarTable("dingdan")] // 指定数据库表名
    public class DingDan
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        /// 
        [Key]
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }
        
        /// <summary>
        /// 订单编号
        /// </summary>
        [SugarColumn(ColumnName = "dingdanbianhao", Length = 50)] // 指定列名和长度
        public string DingDanBianHao { get; set; }

        /// <summary>
        /// 客户名称
        /// </summary>
        [SugarColumn(ColumnName = "kehuid")]
        public string KeHuName { get; set; }

        /// <summary>
        /// 订单日期
        /// </summary>
        [SugarColumn(ColumnName = "dingdanriqi")]
        public DateTime DingDanRiQi { get; set; }

        /// <summary>
        /// 商品名称
        /// </summary>
        [SugarColumn(ColumnName = "shopname", Length = 50)]
        public string ShopName { get; set; }

        /// <summary>
        /// 订单金额
        /// </summary>
        [SugarColumn(ColumnName = "zongjine", DecimalDigits = 2)] // 指定小数位数
        public decimal ZongJinE { get; set; }

        /// <summary>
        /// 订单状态（0：待处理，1：已确认，2：已完成，3：已取消）
        /// </summary>
        [SugarColumn(ColumnName = "zhuangtai")]
        public int ZhuangTai { get; set; }

        /// <summary>
        /// 备注信息
        /// </summary>
        [SugarColumn(ColumnName = "beizhu", Length = 200, IsNullable = true)] // 允许为空
        public string BeiZhu { get; set; }
        public bool IsDele { get; set; }
    }
}